package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.JzToursUserMapper;
import com.ruoyi.system.domain.JzToursUser;
import com.ruoyi.system.service.IJzToursUserService;

/**
 * 微信用户Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-21
 */
@Service
public class JzToursUserServiceImpl implements IJzToursUserService
{
    @Autowired
    private JzToursUserMapper jzToursUserMapper;

    /**
     * 查询微信用户
     * 
     * @param id 微信用户ID
     * @return 微信用户
     */
    @Override
    public JzToursUser selectJzToursUserById(Long id)
    {
        return jzToursUserMapper.selectJzToursUserById(id);
    }

    @Override
    public JzToursUser selectJzToursUserByOpenId(String openId) {
        return jzToursUserMapper.selectJzToursUserByOpenId(openId);
    }

    /**
     * 查询微信用户列表
     * 
     * @param jzToursUser 微信用户
     * @return 微信用户
     */
    @Override
    public List<JzToursUser> selectJzToursUserList(JzToursUser jzToursUser)
    {
        return jzToursUserMapper.selectJzToursUserList(jzToursUser);
    }

    /**
     * 新增微信用户
     * 
     * @param jzToursUser 微信用户
     * @return 结果
     */
    @Override
    public int insertJzToursUser(JzToursUser jzToursUser)
    {
        jzToursUser.setCreateTime(DateUtils.getNowDate());
        return jzToursUserMapper.insertJzToursUser(jzToursUser);
    }

    /**
     * 修改微信用户
     * 
     * @param jzToursUser 微信用户
     * @return 结果
     */
    @Override
    public int updateJzToursUser(JzToursUser jzToursUser)
    {
        return jzToursUserMapper.updateJzToursUser(jzToursUser);
    }

    /**
     * 批量删除微信用户
     * 
     * @param ids 需要删除的微信用户ID
     * @return 结果
     */
    @Override
    public int deleteJzToursUserByIds(Long[] ids)
    {
        return jzToursUserMapper.deleteJzToursUserByIds(ids);
    }

    /**
     * 删除微信用户信息
     * 
     * @param id 微信用户ID
     * @return 结果
     */
    @Override
    public int deleteJzToursUserById(Long id)
    {
        return jzToursUserMapper.deleteJzToursUserById(id);
    }
}
